{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.decomposition import PCA\n",
    "from matplotlib.colors import ListedColormap\n",
    "from sklearn.linear_model import LogisticRegression"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 数据获取"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_wine = pd.read_csv('wine.data',header=None)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "该数据集是UCI的公开数据集，是对意大利同一地区种植的葡萄酒进行分析的结果，数据集共14列数据，第一个属性是类标识符，分别是1/2/3来表示，代表葡萄酒的三个分类。剩余的13个属性是，酒精、苹果酸、灰、灰分的碱度、镁、总酚、黄酮类化合物、非黄烷类酚类、原花色素、颜色强度、色调等。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 设置列索引\n",
    "df_wine.columns =  ['Class label', 'Alcohol', 'Malic acid', 'Ash',\n",
    "                   'Alcalinity of ash', 'Magnesium', 'Total phenols',\n",
    "                   'Flavanoids', 'Nonflavanoid phenols', 'Proanthocyanins',\n",
    "                   'Color intensity', 'Hue',\n",
    "                   'OD280/OD315 of diluted wines', 'Proline']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "(178, 14)"
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 数据维度\n",
    "df_wine.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "2    71\n1    59\n3    48\nName: Class label, dtype: int64"
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 每一类数据包含的样本个数\n",
    "df_wine['Class label'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "   Class label  Alcohol  Malic acid   Ash  Alcalinity of ash  Magnesium  \\\n0            1    14.23        1.71  2.43               15.6        127   \n1            1    13.20        1.78  2.14               11.2        100   \n2            1    13.16        2.36  2.67               18.6        101   \n3            1    14.37        1.95  2.50               16.8        113   \n4            1    13.24        2.59  2.87               21.0        118   \n\n   Total phenols  Flavanoids  Nonflavanoid phenols  Proanthocyanins  \\\n0           2.80        3.06                  0.28             2.29   \n1           2.65        2.76                  0.26             1.28   \n2           2.80        3.24                  0.30             2.81   \n3           3.85        3.49                  0.24             2.18   \n4           2.80        2.69                  0.39             1.82   \n\n   Color intensity   Hue  OD280/OD315 of diluted wines  Proline  \n0             5.64  1.04                          3.92     1065  \n1             4.38  1.05                          3.40     1050  \n2             5.68  1.03                          3.17     1185  \n3             7.80  0.86                          3.45     1480  \n4             4.32  1.04                          2.93      735  ",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Class label</th>\n      <th>Alcohol</th>\n      <th>Malic acid</th>\n      <th>Ash</th>\n      <th>Alcalinity of ash</th>\n      <th>Magnesium</th>\n      <th>Total phenols</th>\n      <th>Flavanoids</th>\n      <th>Nonflavanoid phenols</th>\n      <th>Proanthocyanins</th>\n      <th>Color intensity</th>\n      <th>Hue</th>\n      <th>OD280/OD315 of diluted wines</th>\n      <th>Proline</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>1</td>\n      <td>14.23</td>\n      <td>1.71</td>\n      <td>2.43</td>\n      <td>15.6</td>\n      <td>127</td>\n      <td>2.80</td>\n      <td>3.06</td>\n      <td>0.28</td>\n      <td>2.29</td>\n      <td>5.64</td>\n      <td>1.04</td>\n      <td>3.92</td>\n      <td>1065</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>1</td>\n      <td>13.20</td>\n      <td>1.78</td>\n      <td>2.14</td>\n      <td>11.2</td>\n      <td>100</td>\n      <td>2.65</td>\n      <td>2.76</td>\n      <td>0.26</td>\n      <td>1.28</td>\n      <td>4.38</td>\n      <td>1.05</td>\n      <td>3.40</td>\n      <td>1050</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>1</td>\n      <td>13.16</td>\n      <td>2.36</td>\n      <td>2.67</td>\n      <td>18.6</td>\n      <td>101</td>\n      <td>2.80</td>\n      <td>3.24</td>\n      <td>0.30</td>\n      <td>2.81</td>\n      <td>5.68</td>\n      <td>1.03</td>\n      <td>3.17</td>\n      <td>1185</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>1</td>\n      <td>14.37</td>\n      <td>1.95</td>\n      <td>2.50</td>\n      <td>16.8</td>\n      <td>113</td>\n      <td>3.85</td>\n      <td>3.49</td>\n      <td>0.24</td>\n      <td>2.18</td>\n      <td>7.80</td>\n      <td>0.86</td>\n      <td>3.45</td>\n      <td>1480</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>1</td>\n      <td>13.24</td>\n      <td>2.59</td>\n      <td>2.87</td>\n      <td>21.0</td>\n      <td>118</td>\n      <td>2.80</td>\n      <td>2.69</td>\n      <td>0.39</td>\n      <td>1.82</td>\n      <td>4.32</td>\n      <td>1.04</td>\n      <td>2.93</td>\n      <td>735</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_wine.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 数据集划分"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# \n",
    "X, y = df_wine.iloc[:, 1:].values, df_wine.iloc[:, 0].values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "# \n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3,\n",
    "                                                    stratify=y,\n",
    "                                                    random_state=0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 数据标准化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 实例化\n",
    "sc = StandardScaler()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 对数据集进行标准化\n",
    "X_train_std = sc.fit_transform(X_train)\n",
    "X_test_std = sc.transform(X_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# PCA(Pricipal component analysis)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## PCA实现"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 特征值计算"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "outputs": [],
   "source": [
    "N = X_train_std.shape[0]\n",
    "H = np.identity(N) - np.outer(np.ones(N), np.ones(N)) / N"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 计算协方差矩阵\n",
    "cov_mat = np.dot(np.transpose(X_train_std), np.dot(H, X_train_std)) / N"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 对协方差矩阵进行特征值分解\n",
    "eigen_vals, eigen_vecs = np.linalg.eig(cov_mat)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 特征值分布"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 特征值之和\n",
    "tot = sum(eigen_vals)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 对特征(eigen_vals)进行排序\n",
    "var_exp = sorted(eigen_vals, reverse=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 累计求和\n",
    "cum_var_exp = np.cumsum(var_exp)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "<matplotlib.legend.Legend at 0x15ae2edf0>"
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEGCAYAAABlxeIAAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAlRElEQVR4nO3deXxV1fX38c9iqHEAVIg8KEqwj6AhQAhExMigKKAicYACdUCsouI8YPGpFWppf1qtVKmgFBEHVBAVh1oLYqmgFQQMioAgP1FBKhErgwgEWM8f9+Q2gQwnhDuF7/v14pXcc885e+WS3HX3Pvusbe6OiIhIrUQHICIiyUEJQUREACUEEREJKCGIiAighCAiIoE6iQ4gjEaNGnlGRkaiwxARSSkLFy781t3Tw+6fEgkhIyODBQsWJDoMEZGUYmZfVGV/DRmJiAighCAiIgElBBERAZQQREQkoIQgIiKAEoKIiASUEEREBFBCEBGRQErcmCYiksyenfclrxSsrdIxmUfXZ8R5rWIU0b5RQhCRGm9f3rCrYt7n3wH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jbr7CHc/0d2z3P1Sd99e+VEiibFt2zYaNmyoZCBJycxo2LDhfunBhpllNBEY6u5zgsZPA54A2lS7dZEUoWQgyWx//X6GuTFtV3EyAHD3uUSGekSkBlq9ejVZWVmV7vPss89GHy9YsIAbb4xdAeSvv/6avn37xuz8YU2aNInrr78+0WHETJiE8E8ze8zMuplZVzMbC8w2sxwzy4l1gCKSfPZMCB06dODhhx+OWXtHH30006ZNi9n5JSJMQmgLtABGACOBk4B2wB+BB2IWmYhEPfXUU7Rp04a2bdty6aWXAnD55ZeXepM87LDDAJg9ezZdu3YlPz+f448/nuHDhzN58mROPvlkWrduzapVqyo8vqTVq1fTuXNncnJyyMnJ4b333gNg+PDhzJkzh+zsbEaPHs3s2bPp3bs3u3fvJiMjg++//z56jhNOOIFvvvmGwsJCLrroInJzc8nNzeXdd9/dq71du3YxbNgwcnNzadOmDY899lg0juJey9atW/nZz35GZmYmF1xwAR07dmTBgshExRkzZtCpUydycnLo168fW7ZsASAjI4MRI0aQk5ND69atWb58eYWxvvbaa3Ts2JF27dpx5pln8s033+wVa0Wv3/333x/9GUaMGAHADz/8wLnnnkvbtm3JyspiypQpe50z0cKsmHZ6PAIRSQW/ee0Tln69ab+eM/Po+ow4r1W5z3/yySeMGjWK9957j0aNGvHdd99Ves7FixezbNkyjjzySI4//niuvPJK5s+fz0MPPcSYMWP405/+FCq2o446ipkzZ5KWlsbKlSsZOHAgCxYs4N577+WBBx7g9ddfByJJCKBWrVrk5+fz8ssvM3jwYObNm0ezZs1o3LgxP//5z7nllls47bTT+PLLL+nZsyfLli0r1d7jjz9OgwYN+OCDD9i+fTt5eXn06NGj1Bj52LFjOeKII1i6dClLliwhOzsbgG+//ZZRo0bx1ltvceihh3Lffffx4IMPcvfddwPQqFEjFi1axNixY3nggQeYMGFCubGedtppvP/++5gZEyZM4A9/+AN//OMfQ71mM2bMYOXKlcyfPx93p0+fPrzzzjsUFhZy9NFH89e//hWAjRs3hjpfPIUpf/00cL27bwweNwMmunv3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H7T3aML3Lj7WjP7PTCfyNKBy4GNwdM3Ao8EQyt1iLyhXlNRY+7+iZnVI7LCVPHQzmTgNTP7mMj4/PIyjvvKzKYCS4DPgQ+D7TvMrC/wsEWW86xDZAW6fanWO47Iym/LiFT9XRi0URhcwH7OzA4K9r0ruHidC+S5+y4zu8jMBrv7E/vQthxAVO1UUpaZHebuW4IewsvARHd/OdFxiaQqDRlJKhsZ9CKKP51PT2g0IilOPQQREQHUQxARkYASgoiIAEoIIiISUEIQERFACUFERAL/H80KFAWb++kHAAAAAElFTkSuQmCC\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 绘制图像\n",
    "plt.figure()\n",
    "#\n",
    "plt.bar(range(1, 14), var_exp, alpha=0.5, align='center',\n",
    "        label='distribution of eigenvalues')\n",
    "#\n",
    "plt.step(range(1, 14), cum_var_exp, where='mid',\n",
    "         label='cumulative eigenvalues')\n",
    "plt.ylabel('Variance explained')\n",
    "plt.xlabel('Eigenvalue index')\n",
    "plt.legend(loc='best')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 特征降维"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 创建列表，由(eigenvalue, eigenvector)元组构成\n",
    "eigen_pairs = [(np.abs(eigen_vals[i]), eigen_vecs[:, i])\n",
    "               for i in range(len(eigen_vals))]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "# \n",
    "eigen_pairs.sort(key=lambda k: k[0], reverse=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 取前两个特征值对应的特征向量作为主要成分\n",
    "w = np.hstack((eigen_pairs[0][1][:, np.newaxis],\n",
    "               eigen_pairs[1][1][:, np.newaxis]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "array([ 0.71225893,  2.22048673, -0.13025864,  0.05962872, -0.50432733,\n       -0.52831584, -1.24000033,  0.84118003, -1.05215112, -0.29218864,\n       -0.20017028, -0.82164144, -0.62946362])"
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 原始特征（以第一个样本为例）\n",
    "X_train_std[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "array([2.38299011, 0.45458499])"
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 特征压缩后结果\n",
    "np.dot(np.transpose(w),X_train_std[0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 全部特征压缩\n",
    "X_train_pca = np.dot(X_train_std, w)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAiKklEQVR4nO3de3Bc9XUH8O+Ro2K7yHIxIqUIWUyaFju2q2IFSpLSEocUUggN0JlSNbSFVm2niSWcTvrQFMvTcR+TjmMz7TT1lEwZommnnbxISiAEJ6TN8IhcRGwgdJJGNmKcRDj1g7EdZOv0j92Lrlb37t679/F73O9nZgfvSrp7tDZ79vf7nd/5iaqCiIjINh2mAyAiIorCBEVERFZigiIiIisxQRERkZWYoIiIyEpvMB1AGhdeeKH29/ebDoOIiHK0f//+V1S1p/FxpxJUf38/JicnTYdBREQ5EpFDUY9zio+IiKzEBE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GQlJigiIrISExQREVmJCYqIiKzEBEVUIhE5Vy+DPigi/y4iK+uP/7iI/KuIfFtE9ovIQyLyUxE//3ER+b6IHCw/eqJyMUERleu0qg6o6gYArwH4/fpG008D+IqqvklVN6PWAf6NET//zwCuLy1aIoMq2+qIyAL/CWATgGsBzKnq6xua4xoVq+pX6w1RibzHERSRAfX2RjcAOABgA4D9ZiMisg8TFFG5VojIFIBJ1A7DvM9sOET24hQfUblOq+pA+AEReQ7AbWbCIbIXR1BE5u0DcJ6IDAcPiMgmEfl5gzERGccERWRY/bys9wF4V73M/DkAfwVgyfljIvIvAJ4A8NMiMiMid5UbLVF52M2ciIisxBEUERFZiQmKiIisxARFRERWYoIiIiIrMUEREZGVmKCIiMhKTFBERGSl/wfnnpSWnZmBtwAAAABJRU5ErkJggg==\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 特征压缩后结果展示\n",
    "colors = ['r', 'b', 'g']\n",
    "markers = ['s', 'x', 'o']\n",
    "\n",
    "for l, c, m in zip(np.unique(y_train), colors, markers):\n",
    "    # 按照样本的真实值进行展示\n",
    "    plt.scatter(X_train_pca[y_train == l, 0], \n",
    "                X_train_pca[y_train == l, 1], \n",
    "                c=c, label=l, marker=m)\n",
    "\n",
    "plt.xlabel('PC 1')\n",
    "plt.ylabel('PC 2')\n",
    "plt.legend(loc='lower left')\n",
    "plt.tight_layout()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 使用sklearn实现PCA"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "sklearn中提供了进行PCA的API"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 特征值计算"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 实例化pca，保留所有特征\n",
    "pca = PCA()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 特征提取\n",
    "X_train_pca = pca.fit_transform(X_train_std)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "<matplotlib.legend.Legend at 0x15aea0f40>"
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEGCAYAAACO8lkDAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAmlUlEQVR4nO3deXxV1dX/8c9i0DgAKiAPghLsA2iYQmSQIjiggIrEAQpYFXFARZzF4q9WqKWtVitVC6hFpCoqSJViSxVFqaJVJkEhzIoS5FGkCiICQdbvj3sSb3IznAAnNzd8368Xr+Scu885KyHJunuffdY2d0dERCRetWQHICIilY+Sg4iIJFByEBGRBEoOIiKSQMlBREQS1Eh2AOVVr149T09PT3YYIiIpZeHChV+5e/2w7VMuOaSnp7NgwYJkhyEiklLM7NPytNewkoiIJFByEBGRBEoOIiKSQMlBREQSKDmIiEgCJQcREUkQWXIws4lm9qWZLS3hdTOzh81sjZl9aGZZUcUiIiLlE2XPYRLQq5TXzwaaBf+GAOMjjEVERMohsofg3P0tM0svpUk28JTHFpR4z8yOMLOG7r4xqphERKL27Puf8ffFG8p1TMYxtRl5XsuIIto7yXxCuhGwPm47N9iXkBzMbAix3gXHHXdchQQnIlXT3vzxLo/3P/kvAJ2aHhXZNSpCSpTPcPfHgccB2rdvr6XrRGSv/X3xBnI2biWjYe1Izt+p6VFkZzbi4k6p/UY2mclhA3Bs3HbjYJ+ISKQyGtZmyjWdkx1GpZbM5DADGGZmzwOdgC263yAiEO3QT5S9hqoksuRgZs8BpwH1zCwXGA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fXN5vwgRica6deto1apVmW2effbHWegLFizgxhujK9r8+eef07dv38jOH9akSZMYNmxYssOITJiH4P5tZo8BzxGbvdQfmGNmWQDuvqikA919JjCzyL674z534Nbgn4ikoPzkcPHFFwPQvn172rdvH9n1jjnmGKZNmxbZ+SUmTM+hLbHhnpHAKOBEoB3wR+CByCITkWI99dRTtGnThrZt23LppZcCcPnllxf6g3n44YcDMGfOHE499VSys7M5/vjjGTFiBJMnT6Zjx460bt2atWvXlnp8vHXr1tG1a1eysrLIysri3XffBWDEiBG8/fbbZGZmMmbMGObMmUPv3r3Zs2cP6enpfPPNNwXnaNasGV988QWbNm3ioosuokOHDnTo0IF33nkn4Xo//PADw4cPp0OHDrRp04bHHnusII783sz27dv52c9+RkZGBhdccAGdOnViwYLYRMtZs2bRuXNnsrKy6NevH9u2bQMgPT2dkSNHkpWVRevWrVmxYkWpsb788st06tSJdu3aceaZZ/LFF18kxFra9+/+++8v+BpGjhwJwHfffce5555L27ZtadWqFVOmTEk4Z7KFeQgu9INvIgeSX7+8jJzPt+7Xc2YcU5uR57Us8fVly5YxevRo3n33XerVq8d///vfMs+5ZMkSli9fzlFHHcXxxx/PVVddxbx583jooYd45JFH+NOf/hQqtqOPPprXXnuNtLQ0Vq9ezcCBA1mwYAH33nsvDzzwAP/4R+x52Tlz5gBQrVo1srOzeemllxg8eDDvv/8+TZo0oUGDBlx88cXccsstnHLKKXz22Wf07NmT5cuXF7reE088QZ06dZg/fz47d+6kS5cu9OjRo9CY+rhx4zjyyCPJyclh6dKlZGZmAvDVV18xevRoXn/9dQ477DDuu+8+HnzwQe6+OzZwUa9ePRYtWsS4ceN44IEHmDBhQomxnnLKKbz33nuYGRMmTOAPf/gDf/zjH0N9z2bNmsXq1auZN28e7k6fPn1466232LRpE8cccwz//Oc/AdiyZUuo81WkMCW7nwaGufuWYLsJMNHdu0cdnIgU9sYbb9CvXz/q1asHwFFHlV3mrEOHDjRs2BCAn/zkJ/ToEVsOvnXr1rz55puhr52Xl8ewYcNYvHgx1atXZ9WqVWUe079/f+655x4GDx7M888/T//+/QF4/fXXycn58XnYrVu3sm3btkLvuGfNmsWHH35Y8I58y5YtrF69mubNmxe0mTt3LjfddBMArVq1ok2bNgC899575OTk0KVLFwB27dpF586dC4678MILATjppJN48cUXS401NzeX/v37s3HjRnbt2lWuKaKzZs1i1qxZtGvXDoBt27axevVqunbtym233cYvfvELevfuTdeuXUOfs6KEuecwF3jfzG4l9mDbcGJ1lgR49v3P+PviojN094+cjVvJaFg7knPLvivtHX5Fq1GjBnv27AFgz5497Nq1q+C1gw8+uODzatWqFWxXq1aN3bt3l3l8vjFjxtCgQQOWLFnCnj17SEtLS2hTVOfOnVmzZg2bNm1i+vTp3HXXXQXXeO+990o9h7vzyCOP0LNnz0L7161bV+Z13Z2zzjqL5557rtjX878H1atXL/gelBTrDTfcwK233kqfPn2YM2cOo0aNSjhfSd8/d+fOO+/kmmuuSThm0aJFzJw5k7vuuovu3bsX9GoqizLvObj7Y8BVwN+Be4Bu+avECfx98QZyNu7foYV8GQ1rk53ZKJJzS2o644wzeOGFF9i8OTapL39YKT09nYULFwIwY8YM8vLySjxHccIcv2XLFho2bEi1atV4+umn+eGHHwCoVasW335b/LOxZsYFF1zArbfeyoknnkjdunUB6NGjB4888khBu8WLFycc27NnT8aPH18Qy6pVq/juu+8KtenSpQtTp04FICcnh48++giAk08+mXfeeYc1a9YAsTH+sno6JcW6ZcsWGjWK/R7+9a/FL4xZ0vevZ8+eTJw4seB+x4YNG/jyyy/5/PPPOfTQQ7nkkksYPnw4ixaVOK8nacIMK10K/Aq4DGgDzDSzwe6+JOrgUkVGw9pMuaZz2Q1F9lHLli355S9/yamnnkr16tVp164dkyZN4uqrryY7O5u2bdvSq1cvDjvssHKdN8zxQ4cO5aKLLuKpp54q1KZNmzZUr16dtm3bcvnllxcMoeTr378/HTp0YNKkSQX7Hn74Ya6//nratGnD7t276datG48++mih46666irWrVtHVlYW7k79+vWZPn16QkyDBg0iIyODE044gZYtW1KnTh3q16/PpEmTGDhwIDt37gRg9OjRhYakilNcrKNGjaJfv34ceeSRnHHGGXzyySehv389evRg+fLlBUNahx9+OM888wxr1qxh+PDhVKtWjZo1azJ+/PhS40oGi80mLaWB2XRgSH5RPDPrCDzu7pmRR1eM9u3be/5shMqg/2P/AVByOEAsX76cE088MdlhSOCHH34gLy+PtLQ01q5dy5lnnsnKlSs56KCDkh1aUhX3c2pmC9099BzjMLOVzg9OfKi7b3f3eUGCEBFJqu3bt3P66aeTl5eHuzNu3LgDPjHsL2GGlToDTwCHA8eZWVvgGmBoxLGJiJSqVq1aVKaRhKokzENwfwJ6ApsBgnsN3SKMSUREkixMcsDd1xfZ9UMEsYiISCUR5jmH9Wb2U8DNrCZwE7FCeiIiUkWF6TlcS6xMdyNi6zFkBtsiIlJFhXkI7it3/7m7N3D3o939EpXVFqkcRo0axQMPxOpf3n333bz++usltp0+fXqhkhVFPfroozz11FMAnHbaaeW60fvNN98wbty4gu2KKKv99ttv07JlSzIzM/n+++9DHXPOOecUKq6XDGHKoFcGYYaVRKQEY14ru75QedxyVukPaZXmnnvuKfX16dOn07t3bzIyMhJe2717N9dee+1eXzs/OQwdGpvEWBFltSdPnsydd97JJZdcEvqYmTNnlt1IgJA3pEWk8vjtb39L8+bNOeWUU1i5cmXB/viy0SNGjCAjI4M2bdpw++238+677zJjxgyGDx9OZmYma9eu5bTTTuPmm2+mffv2PPTQQ4V6IQBPP/00mZmZtGrVinnz5gEktGnVqhXr1q1jxIgRrF27lszMTIYPH17o3fGOHTsYPHgwrVu3pl27dgXF/iZNmsSFF15Ir169aNasGXfccUexX+/s2bNp164drVu35oorrmDnzp1MmDCBqVOn8qtf/Yqf//znCcc888wzdOzYkczMTK655pqCUh/p6el89dVXAPzmN7+hRYsWnHLKKQwcOLDg61q7di29evXipJNOomvXrqxYsaLg+3vjjTfy05/+lOOPP77gez1gwICC6qrx/w8llTiPV3TBoN69exdUtS2p5HjR/9uoqOcgkkIWLlzI888/z+LFi9m9ezd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SDrbYGsPdg/0rgfoWrFttZjXNrGXYL66It4CLg/O0AtoE+98DupjZ/wavHWZm+b2n+4itP3A38Je9vK4cYNRzkFRwiJktjtt+xd0LFutx9w1m9jtgHrHlEVcAW4KXbwTGBsMvNYj9cb22tIu5+zIzq0Vs5az84Z/JwMtm9hGx8fwVxRy33symAkuBT4APgv27zKwv8LDFliytQWxlvb2pKDye2Ip2y4lVJl4YXGNTcPP7OTM7OGh7V3DjuwPQxd1/MLOLzGywuz+5F9eWA4iqskqVYGaHu/u2oOfwEjDR3V9KdlwiqUrDSlJVjAp6F/nv2qcnNRqRFKeeg4iIJFDPQUREEig5iIhIAiUHERFJoOQgIiIJlBxERCTB/wep5oaxE4Ch3AAAAABJRU5ErkJggg==\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 绘制图像\n",
    "plt.figure()\n",
    "#\n",
    "plt.bar(range(1, 14), pca.explained_variance_ratio_, alpha=0.5, align='center',\n",
    "        label='distribution of eigenvalues')\n",
    "#\n",
    "plt.step(range(1, 14), np.cumsum(pca.explained_variance_ratio_), where='mid',\n",
    "         label='cumulative eigenvalues')\n",
    "plt.ylabel('Variance explained')\n",
    "plt.xlabel('Eigenvalue index')\n",
    "plt.legend(loc='best')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 特征降维"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 压缩到二维特征\n",
    "pca = PCA(n_components=2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 对训练数据进行降维\n",
    "X_train_pca = pca.fit_transform(X_train_std)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0.36951469 0.18434927]\n"
     ]
    }
   ],
   "source": [
    "# 特征值结果(只保留两个特征)\n",
    "print(pca.explained_variance_ratio_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 对测试集数据进行降维\n",
    "X_test_pca = pca.fit_transform(X_test_std)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAiKklEQVR4nO3de3Bc9XUH8O+Ro2K7yHIxIqUIWUyaFju2q2IFSpLSEocUUggN0JlSNbSFVm2niSWcTvrQFMvTcR+TjmMz7TT1lEwZommnnbxISiAEJ6TN8IhcRGwgdJJGNmKcRDj1g7EdZOv0j92Lrlb37t679/F73O9nZgfvSrp7tDZ79vf7nd/5iaqCiIjINh2mAyAiIorCBEVERFZigiIiIisxQRERkZWYoIiIyEpvMB1AGhdeeKH29/ebDoOIiHK0f//+V1S1p/FxpxJUf38/JicnTYdBREQ5EpFDUY9zio+IiKzEBEVERFZigiIiIisxQRERkZWYoIiIyEpMUEREZCUmKCJKbOLABPp396NjRwf6d/dj4sCE6ZDIY07tgyIicyYOTGD4c8M4NXcKAHDo+CEMf24YADC0cchkaOQpjqCIKJGxx8ZeT06BU3OnMPbYmKGIyHdMUESUyOHjh1M9TpQVExQRJdLX3ZfqcaKsmKCIKJGdW3ZiZefKRY+t7FyJnVt2GoqIfMcERUSJDG0cwt6b9mJt91oIBGu712LvTXtZIEGFEVU1HUNig4ODym7mRER+EZH9qjrY+DhHUEREZCUmKCIispKxBCUiy0XkaRF5VkSeE5EdpmIhIiL7mOwk8UMA71TVV0WkE8B/icgXVPVJgzEREZEljCUorVVnvFq/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ARFRERWYoIiIiIrMUEREZGVmKCIiMhKTFBERGSl/wfnnpSWnZmBtwAAAABJRU5ErkJggg==\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 特征降维后结果展示\n",
    "colors = ['r', 'b', 'g']\n",
    "markers = ['s', 'x', 'o']\n",
    "\n",
    "for l, c, m in zip(np.unique(y_train), colors, markers):\n",
    "    # 按照样本的真实值进行展示\n",
    "    plt.scatter(X_train_pca[y_train == l, 0], \n",
    "                X_train_pca[y_train == l, 1], \n",
    "                c=c, label=l, marker=m)\n",
    "\n",
    "plt.xlabel('PC 1')\n",
    "plt.ylabel('PC 2')\n",
    "plt.legend(loc='lower left')\n",
    "plt.tight_layout()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 利用逻辑回归进行分类"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 绘制函数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 绘制样本及其目标值\n",
    "def plot_decision_regions(X, y, classifier, resolution=0.02):\n",
    "    \"\"\"\n",
    "    X:样本特征值\n",
    "    y:目标值\n",
    "    classifier: 分类器\n",
    "    \"\"\"\n",
    "    # 设置图像的标记及颜色\n",
    "    markers = ('s', 'x', 'o', '^', 'v')\n",
    "    colors = ('red', 'blue', 'lightgreen', 'gray', 'cyan')\n",
    "    cmap = ListedColormap(colors[:len(np.unique(y))])\n",
    "\n",
    "    # 利用样本点创建meshgrid\n",
    "    x1_min, x1_max = X[:, 0].min() - 1, X[:, 0].max() + 1\n",
    "    x2_min, x2_max = X[:, 1].min() - 1, X[:, 1].max() + 1\n",
    "    xx1, xx2 = np.meshgrid(np.arange(x1_min, x1_max, resolution),\n",
    "                           np.arange(x2_min, x2_max, resolution))\n",
    "    # 预测结果\n",
    "    Z = classifier.predict(np.array([xx1.ravel(), xx2.ravel()]).T)\n",
    "    Z = Z.reshape(xx1.shape)\n",
    "    # 绘制预测结果的等高线\n",
    "    plt.contourf(xx1, xx2, Z, alpha=0.4, cmap=cmap)\n",
    "    plt.xlim(xx1.min(), xx1.max())\n",
    "    plt.ylim(xx2.min(), xx2.max())\n",
    "\n",
    "    # 绘制样本点,并根据真实值进行着色\n",
    "    for idx, cl in enumerate(np.unique(y)):\n",
    "        # 绘制散点图\n",
    "        plt.scatter(x=X[y == cl, 0], \n",
    "                    y=X[y == cl, 1],\n",
    "                    alpha=0.6, \n",
    "                    c=cmap(idx),\n",
    "                    edgecolor='black',\n",
    "                    marker=markers[idx], \n",
    "                    label=cl)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### PCA特征降维"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 利用PCA进行特征降维\n",
    "# 保留两维特征\n",
    "pca = PCA(n_components=2)\n",
    "# 训练集数据处理\n",
    "X_train_pca = pca.fit_transform(X_train_std)\n",
    "# 测试集数据处理\n",
    "X_test_pca = pca.transform(X_test_std)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### LR分类器"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 实例化\n",
    "lr = LogisticRegression()\n",
    "# 模型训练\n",
    "lr = lr.fit(X_train_pca, y_train)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 训练数据结果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "*c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*.  Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.\n",
      "*c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*.  Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.\n",
      "/var/folders/nl/5xqj0k597kv06_pyjvngz2p40000gp/T/ipykernel_63356/2995315095.py:29: UserWarning: You passed a edgecolor/edgecolors ('black') for an unfilled marker ('x').  Matplotlib is ignoring the edgecolor in favor of the facecolor.  This behavior may change in the future.\n",
      "  plt.scatter(x=X[y == cl, 0],\n",
      "*c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*.  Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.\n"
     ]
    },
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAuiElEQVR4nO3dfXyV5Zkn8N8FIQQKgiAx5S2KYIDIiyRFJDQWREtHFFvU6jjtOrKFzrYd2umOXYvbma6unZ1Op3Wns581O7p2Vsa3wRanVVoVawoFNYCA4aVSxhASYiCFAEIgL9f+8eQk5z3n5Xme+37O+X0/Hz5wTpJzLqI8v9z3fd33I6oKIiIi2wwyXQAREVE8DCgiIrISA4qIiKzEgCIiIisxoIiIyEoFpgtIx2UjRugVY8eaLoPIM43nB+NjE4Bhg4aZLoXIN/t27juhquOinw9UQF0xdizq1q0zXQaRZ2q+14bWH1yKFVVVpksh8s3sotkN8Z7nFB+RRVY/yBkCohAGFBERWYkBRWShjdu3my6ByDgGFJFlHjo0COjuNl0GkXHGA0pEBovILhH5uelaiIjIHsYDCsBaAPtNF0FERHYxGlAiMhHALQD+yWQdRDZ640i96RKIjDI9gvoRgAcA9CT6BBFZLSJ1IlJ3/OxZ3w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i+YTZcojsxSk+In+dV9W54U+ISD2AO8yUQ2QvjqCIzNsMYKiIrA49ISKzReSTBmsiMo4BRWRY772wPgtgaW+beT2A7wGIuW+YiDwDYBuAMhE5KiKr/K2WyD88zZyIiKzEERQREVmJAUVERFZiQBERkZUYUEREZCUGFBERWYkBRUREVmJAERGRlf4/sYNXxAnCi2kAAAAASUVORK5CYII=\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#\n",
    "plot_decision_regions(X_train_pca, y_train, classifier=lr)\n",
    "plt.xlabel('PC 1')\n",
    "plt.ylabel('PC 2')\n",
    "plt.legend(loc='lower left')\n",
    "plt.tight_layout()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 测试数据结果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "*c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*.  Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.\n",
      "*c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*.  Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.\n",
      "/var/folders/nl/5xqj0k597kv06_pyjvngz2p40000gp/T/ipykernel_63356/2995315095.py:29: UserWarning: You passed a edgecolor/edgecolors ('black') for an unfilled marker ('x').  Matplotlib is ignoring the edgecolor in favor of the facecolor.  This behavior may change in the future.\n",
      "  plt.scatter(x=X[y == cl, 0],\n",
      "*c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*.  Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.\n"
     ]
    },
    {
     "data": {
      "text/plain": "<Figure size 432x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m7ue4+0yiXd9PL/D4FcCCilUrEpC2OhIJ59fAdGAu0OLuxy9i7mpzYneva938VCT1NIISCaB1K6MrgA3A+cC6sBWJxI8CSqSyBpvZq0A90QGYD4YtRyS+NMUnUllH3P3C/DvMrAH4VJhyROJLIyiR8NYAJ5vZ0twdZjbdzD4SsCaR4BRQIoG1npF1LTC/tc28Afgm0OnMMTN7GHgOmGxmO81sSWWrFakc7WYuIiKxpBGUiIjEkgJKRERiSQElIiKxpIASEZFYUkCJiEgsKaBERCSWFFAiIhJL/x8dSauY4Lw2mwAAAABJRU5ErkJggg==\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#\n",
    "plot_decision_regions(X_test_pca, y_test, classifier=lr)\n",
    "plt.xlabel('PC 1')\n",
    "plt.ylabel('PC 2')\n",
    "plt.legend(loc='lower left')\n",
    "plt.tight_layout()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# LDA(Linear discriminant analysis)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## LDA实现"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 精度设置,浮点数\n",
    "np.set_printoptions(precision=4)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 平均向量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 计算每一类数据的平均向量\n",
    "mean_vecs = []\n",
    "for label in range(1, 4):\n",
    "    mean_vecs.append(np.mean(X_train_std[y_train == label], axis=0))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 类内散度矩阵Sw"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 特征维度\n",
    "d = 13 \n",
    "S_W = np.zeros((d, d))\n",
    "# 获取每个类别的平均值向量\n",
    "for label, mv in zip(range(1, 4), mean_vecs):\n",
    "    # 每一类别的散度矩阵\n",
    "    class_scatter = np.zeros((d, d))\n",
    "    for row in X_train_std[y_train == label]:\n",
    "        # 列向量\n",
    "        row, mv = row.reshape(d, 1), mv.reshape(d, 1) \n",
    "        class_scatter += np.dot(row - mv, (row - mv).T)\n",
    "    # 每个类别散度矩阵之和\n",
    "    S_W += class_scatter                         "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 类间散度矩阵SB"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 全局平均值\n",
    "mean_overall = np.mean(X_train_std, axis=0)\n",
    "# 特征维度\n",
    "d = 13  \n",
    "S_B = np.zeros((d, d))\n",
    "# 获取每个类别的平均值\n",
    "for i, mean_vec in enumerate(mean_vecs):\n",
    "    n = X_train[y_train == i + 1, :].shape[0]\n",
    "    # 列向量\n",
    "    mean_vec = mean_vec.reshape(d, 1)  \n",
    "    mean_overall = mean_overall.reshape(d, 1)  \n",
    "    # 类间散度矩阵\n",
    "    S_B += n*np.dot(mean_vec-mean_overall, (mean_vec-mean_overall).T)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 特征值计算"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "求解矩阵 $S_W^{-1}S_B$的特征值和特征向量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 计算LDA的特征值\n",
    "eigen_vals, eigen_vecs = np.linalg.eig(np.dot(np.linalg.inv(S_W), S_B))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "array([-8.8818e-16+0.0000e+00j,  4.2257e+00+0.0000e+00j,\n        8.2625e+00+0.0000e+00j, -4.9896e-17+6.1916e-16j,\n       -4.9896e-17-6.1916e-16j, -4.6033e-16+0.0000e+00j,\n        4.2709e-16+0.0000e+00j,  3.2987e-16+0.0000e+00j,\n        1.2007e-16+1.8323e-16j,  1.2007e-16-1.8323e-16j,\n       -2.0953e-16+1.0282e-17j, -2.0953e-16-1.0282e-17j,\n        6.1027e-18+0.0000e+00j])"
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "eigen_vals"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 创建由特征值和特征向量组成的list\n",
    "eigen_pairs = [(np.abs(eigen_vals[i]), eigen_vecs[:, i])\n",
    "               for i in range(len(eigen_vals))]\n",
    "\n",
    "# 根据特征值从大到小排序(eigenvalue, eigenvector)\n",
    "eigen_pairs = sorted(eigen_pairs, key=lambda k: k[0], reverse=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 特征降维"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 保留两维特征\n",
    "w = np.hstack((eigen_pairs[0][1][:, np.newaxis].real,\n",
    "              eigen_pairs[1][1][:, np.newaxis].real))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 特征降维\n",
    "X_train_lda = np.dot(X_train_std,w)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEGCAYAAABsLkJ6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAhLElEQVR4nO3df2xd5XkH8O9j45JmOE4JqehIHU8bKkma4eIoGVoFo4yNRq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ytIigD8A8C14yb5/UNUXzbbKDBF5CMAzAN4nIidF5DOm22TILwP4FIAPLfULcyKy3XSjWmEpCCKiiuIIgIioohgAiIgqigGAiKiiGACIiCqKAYCIqKIYAIiaEJE3Ix6bFJFXl5b6/VhEvh5X+KvqVVPJbgwARO3Zq6qDqno1gL8H8JSIrI14XmWrppL9GACIOqSqfw/g2wA+GfGzKldNJcsxABBl4zkA15huBFEaDABE2RDTDSBKiwGAKBsfgFcXiMgZDABEHRKROwD8GoCHTLeFKA0WgyNqQkRqAP4z8NA9AFYB+F0A8wB+Bt5Kn3FVPRLx+o8D+BKAtQBOA5hT1V/PudlEiTAAEBFVFKeAiIgqigGAiKiiGACIiCqKAYCIqKIYAIiIKooBgIioohgAiIgq6v8BxsOOUnE+dRAAAAAASUVORK5CYII=\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 结果绘制\n",
    "colors = ['r', 'b', 'g']\n",
    "markers = ['s', 'x', 'o']\n",
    "\n",
    "for l, c, m in zip(np.unique(y_train), colors, markers):\n",
    "    plt.scatter(X_train_lda[y_train == l, 0],\n",
    "                X_train_lda[y_train == l, 1] * (-1),\n",
    "                c=c, label=l, marker=m)\n",
    "\n",
    "plt.xlabel('LD 1')\n",
    "plt.ylabel('LD 2')\n",
    "plt.legend(loc='lower right')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 使用sklearn实现LDA并进行LR分类"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA\n",
    "# 实例化 (保留二维)\n",
    "lda = LDA(n_components=2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 对训练数据进行LDA处理\n",
    "X_train_lda = lda.fit_transform(X_train_std, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 实例化逻辑回归\n",
    "lr = LogisticRegression()\n",
    "# 训练\n",
    "lr = lr.fit(X_train_lda, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "*c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*.  Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.\n",
      "*c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*.  Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.\n",
      "/var/folders/nl/5xqj0k597kv06_pyjvngz2p40000gp/T/ipykernel_63356/2995315095.py:29: UserWarning: You passed a edgecolor/edgecolors ('black') for an unfilled marker ('x').  Matplotlib is ignoring the edgecolor in favor of the facecolor.  This behavior may change in the future.\n",
      "  plt.scatter(x=X[y == cl, 0],\n",
      "*c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*.  Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.\n"
     ]
    },
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAs20lEQVR4nO3de3hV5Z0v8O8vNyKCZIjEyFVRCMKEKKKDcnFAa+mRolU5Xpi2Xs4BndHHS89jqz4953Q8M2cuHW2mnXlGjq3YKVUHYapjLVWbagzeCDcjEOQyBkiIXGyQyCW39/yxsrLX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
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 训练数据结果\n",
    "plot_decision_regions(X_train_lda, y_train, classifier=lr)\n",
    "plt.xlabel('LD 1')\n",
    "plt.ylabel('LD 2')\n",
    "plt.legend(loc='lower left')\n",
    "plt.tight_layout()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "*c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*.  Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.\n",
      "*c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*.  Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.\n",
      "/var/folders/nl/5xqj0k597kv06_pyjvngz2p40000gp/T/ipykernel_63356/2995315095.py:29: UserWarning: You passed a edgecolor/edgecolors ('black') for an unfilled marker ('x').  Matplotlib is ignoring the edgecolor in favor of the facecolor.  This behavior may change in the future.\n",
      "  plt.scatter(x=X[y == cl, 0],\n",
      "*c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*.  Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.\n"
     ]
    },
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAfK0lEQVR4nO3df5SV1X3v8feX3yqIC2RCEBglQRADKKCVgliQRFMNmFATfySt1XtJ06tLm6Smyr131aa/7m0b40rbtUJNmttbot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TFDO7Emh19w1m9muBywlhEDALuMXdnzeze4A/AP5bNd8oDeDuiys9b2bTKfyLYrOZQWF6a6OZXejuLQmW2FA9ff4iM7sBuBK41LN/M94bwISSx+M7nssNMxtMIZxWufvDoetJ2DxgiZn9OjAMONXM/tHdPx+4rqTsBfa6e3HU/M8UAuqEdKNuYGb2GjDH3XOzy7GZXQ58A7jE3d8MXU+jmdkgCs0gl1IIpheB69x9a9DCEmKFf4n9L+Btd78tcDlBdYygvuruVwYuJVFm9hPgP7n7TjP7Q+AUd//9E32fRlASwl8DQ4E1HaPIn7r774QtqXHcvd3MbgYeAwYC381LOHWYB3wB2GJmmzqeu9PdfxiuJEnYLcAqMxsC7AJ+u5pv0ghKRESipC4+ERGJkgJKRESipIASEZEoKaBERCRKCigREYmSAkokQWZ2uMJzf2hmb5jZJjN7xcwe7mkzVTO7umNH8ONmNqfxFYuEo4ASicPd7n6eu08GHgDWmtmYCl/3c+AzwLpEqxMJQAElEhl3fwB4HLiuwmvb3X1n8lWJJE8BJRKnjcDU0EWIhKSAEomThS5AJDQFlEiczie/p6+KAAookeiY2TIK54XdF7oWkZC0WaxIgszsOLCv5KlvAKcC/5nCqaOnUOjUW+Hu2yp8/6eBbwFjgHeATe5+WYPLFglCASUiIlHSFJ+IiERJASUiIlFSQImISJQUUCIiEiUFlIiIREkBJSIiUVJAiYhIlP4/uCwPbOBR6ZQAAAAASUVORK5CYII=\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 测试数据结果\n",
    "X_test_lda = lda.transform(X_test_std)\n",
    "plot_decision_regions(X_test_lda, y_test,classifier=lr)\n",
    "plt.xlabel('LD 1')\n",
    "plt.ylabel('LD 2')\n",
    "plt.legend(loc='lower left')\n",
    "plt.tight_layout()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.5"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "274px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}